<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-sref="main"><i class="glyphicon glyphicon-log-in"></i> 门禁管理</a></li>
        <li><a ui-sref="main.authm.cardAuth.inAndOutlist" class="active" ng-bind="title"></a></li>

    </ul>
</div>

<!-- 加载提醒 -->
<div ng-show="loading" class="text-center m-t-md text-lg dataWarn"><i class="fa fa-spin fa-spinner"></i> 数据加载中...</div>
<!-- 内容区域 -->
<div ng-hide="loading" class="wrapper-md content">
    <!-- 数据显示 -->
    <div class="wrapper-data">
        <div class="panel panel-default">
            <!-- 头部 -->
            <div class="panel-heading clearfix">
                
                 <div class="w-auto">
                    <form ng-submit="search()" class="form-inline">
                   	 <div class="form-group">
								<label for="name">房屋地址：</label> <input type="text"
									class="form-control" style="width: 180px"
									placeholder="" ng-model="param.locationAddr">
						</div>
					 	<div class="form-group">
								<label for="name">姓名：</label> <input type="text"
									class="form-control" style="width: 180px"
									placeholder="" ng-model="param.personName">
						</div>
						<div class="form-group">
							<label for="authType">开门类型：</label>
							<select class="form-control" style="width: 180px" ng-model="param.inOutType" id="inOutType">
								<option value="">全部</option>
								<option value="0">刷卡</option>
								<option value="2">后台开门</option>
								<option value="3">室内开门</option>
								<option value="1">APP开门</option>
							</select>
						</div>
						<div class="form-group">
								<label for="name">时间：</label>
								<div class="input-group m-d"style="position: relative">
		                            <input type="text" style="width: 150px"
		                                   class="form-control ng-pristine ng-valid ng-isolate-scope ng-empty ng-valid-date ng-touched"
		                                   name="startTime" current-text="今天" clear-text="清除" close-text="关闭"
		                                   ng-model="param.startTime" datepicker-popup="yyyy-MM-dd" 
		                                   id="startTime" is-open="startTime" datepicker-options="timeOptions"
		                                   placeholder="请选择开始时间..." 
		                            >
		                            <span class="input-group-btn">
										<button type="button" class="btn btn-default" ng-click="openDatepicker($event,1)">
										<i class="glyphicon glyphicon-calendar"></i>
										</button>
									</span>
		                        </div>
		                        -
		                        <div class="input-group m-d"style="position: relative">
		                            <input type="text" style="width: 150px"
		                                   class="form-control ng-pristine ng-valid ng-isolate-scope ng-empty ng-valid-date ng-touched"
		                                   name="endTime" current-text="今天" clear-text="清除" close-text="关闭"
		                                   ng-model="param.endTime" datepicker-popup="yyyy-MM-dd" 
		                                   id="endTime" is-open="endTime" datepicker-options="timeOptions"
		                                   placeholder="请选择结束时间..." 
		                            >
		                            <span class="input-group-btn">
										<button type="button" class="btn btn-default" ng-click="openDatepicker($event,2)">
										<i class="glyphicon glyphicon-calendar"></i>
										</button>
									</span>
		                        </div>
							</div>
						<div class="form-group">
							<label for="authType">状态：</label>
							<select class="form-control" style="width: 180px" ng-model="param.inOutResult" id="inOutResult">
								<option value="">全部</option>
								<option value="0">成功</option>
								<option value="1">失败</option>
							</select>
						</div>
						<div class="form-group">
							<button  type="submit" class="btn btn-primary new-primary"
								style="margin-left: 10px">查询</button>
						</div>
                    </form>
                </div>
            </div>

            <!-- 数据表格 -->
            <div class="table-responsive">
                <table class="table table-striped b-t b-light text-center">
                    <thead>
                    <tr>
                    	<th>房屋地址</th>
                    	<th>姓名</th>
                    	<th ng-show="projectId !=='2'">授权码</th>
                    	<th ng-show="projectId !=='2'">授权码类型</th>
                    	<td ng-show="projectId =='2'">学号</td>
                    	<th>开门类型</th>
                    	<th>开门时间</th>
                       	<th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="item in pageInfo.data">
                        <td class="v-middle">{{item.locationAddr}}</td>
                        <td class="v-middle">{{item.personName}}</td>
                        <td class="v-middle" ng-show="projectId !=='2'">{{item.authNo}}</td>
                        <td class="v-middle" ng-show="projectId !=='2'">
                        	<span ng-show="item.authType=='0'">身份证</span>
                        	<span ng-show="item.authType=='4'">居住证</span>
                        	<span ng-show="item.authType=='5'">IC卡</span>
                        </td>
                        <td ng-show="projectId =='2'">{{item.studentNo}}</td>                       
                        <td class="v-middle" >
                        	<span ng-show="item.inOutType=='0'">刷卡</span>
                        	<span ng-show="item.inOutType=='1'">app开门</span>
                        	<span ng-show="item.inOutType=='2'">后台开门</span>
                            <span ng-show="item.inOutType=='3'">室内按钮开门</span>
                        </td>                      
						<td class="v-middle">{{item.inOutTime}}</td>
                        <td class="v-middle">
							<span ng-if="item.inOutResult==0" class="text-success">成功</span>
                            <span  ng-if="item.inOutResult==1" class="text-danger">失败</span>
                        </td>
                        <td class="v-middle">
                       		<a href="#" ui-sref="main.authm.cardAuth.details({'id': item.id,'inOutType': item.inOutType,'date': item.inOutTime})">详情</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div><!-- /.table-responsive -->

            <!-- 底部分页 -->
			<span data-ng-include=" 'src/tpl/pageInfo.html' "></span>
        </div><!-- /.panel -->
    </div><!-- /.wrapper-data -->

</div><!-- /.wrapper-md -->
